﻿#pragma once

#include "Framework/Application.h"
#include "Path/Paths.h"
#include "Output/Console.h"

#include "Audio/AudioSubsystem.h"
#include "Audio/Audio.h"

void TestAudio()
{
  auto AudioSubsystem=RApplication::GetApplication()->GetSubsystem<RAudioSubsystem>();
  
  CString FileName=
    //U"test.wav";
    U"TestWav32.wav";
    //U"Missile.wav";
    //U"SuperMario.wav";
  auto Audio=AudioSubsystem->LoadWavFile(SPaths::GetContentDirectory()/U"AudioTester"/FileName);
  auto Player=AudioSubsystem->PlaySound(Audio);
}

int main(int argc, char* argv[])
{
  auto App=NewObject<RApplication>();

  SApplicationArgument Argument;
  Argument.ExecutablePath=argv[0];
  App->Initialize(Argument);

  TestAudio();

  return App->Run();
}